﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTextCharFormat>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_pushButtonBold_clicked(bool checked);

    void on_pushButtonItalic_clicked(bool checked);

    void on_pushButtonUnderline_clicked(bool checked);

    void on_pushButtonFg_clicked();

    void on_pushButtonBg_clicked();

    void on_lineEdit_editingFinished();

    void on_textEdit_currentCharFormatChanged(const QTextCharFormat &format);

    void on_textEdit_textChanged();

private:
    Ui::MainWindow *ui;

private slots:
    void onFontChanged(int index);
};
#endif // MAINWINDOW_H
